package com.itsu.app.service;

import com.itsu.interfaces.entity.Question;
import com.itsu.interfaces.service.QuestionService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

@Service
public class AppQuestionService {

    @Reference
    QuestionService questionService;

    public Question findQuestion(Integer userId) {
       return questionService.findByUserId(userId);
    }

    public void updateQuestions(Long uid, String content) {
        Question question = new Question();
        question.setUserId(uid);
        question.setTxt(content);
        questionService.updateQuestions(question);
    }
}
